package no.sachmuld.methodcombination.examples.reflection.multipleinheritance;

import no.sachmuld.methodcombination.api.MethodCombinationSupport;
import no.sachmuld.methodcombination.api.MethodInvocation;
import no.sachmuld.methodcombination.api.reflection.Default;

/**
 *
 */
public class Person extends MethodCombinationSupport<PersonBehaviour> {

    public Person(final String name) {

        with(new PersonBehaviour() {

            @Override
            public String toString(MethodInvocation<String> methodInvocation) {
                return name;
            }

        });

    }

    public final String toString() {
        return new Default<String>().build(PersonBehaviour.class, Person.class, "toString").execute(this, chain());
    }

}
